package com.lwy.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lwy.entity.BookMessage;
import com.lwy.service.impl.BookMessageServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
//消息表controller控制层
@RestController
@RequestMapping("msg")
public class BookMessageController {

    @Resource
    private BookMessageServiceImpl bookMessageService;
    //根据id查询消息
    @RequestMapping("listUserId")
    public List<BookMessage> listUserId(Integer uid){
        return bookMessageService.listUserId(uid);
    }

    @RequestMapping("clear")
    public Object clear(Integer uid){
        return bookMessageService.clear(uid);
    }
}
